package com.sky.mapper;

import com.github.pagehelper.Page;
import com.sky.annotation.AutoFill;
import com.sky.dto.CategoryPageQueryDTO;
import com.sky.entity.Category;
import com.sky.enumeration.OperationType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CategoryMapper {


    /**
     * 分类分页查询
     * @param
     * @return
     */
    Page<Category> page(CategoryPageQueryDTO categoryPageQueryDTO) ;

    /**
     * 修改分类
     * @param category
     */
    @AutoFill(value = OperationType.UPDATE)
    void update(Category category);
    @Select("delete from category where id = #{id}")
    void delete(Long id);

     List<Category> list(Integer type);
}
